FurΒΆ

The fur workflow

The Guerilla fur workflow is a solution to render a high (millions+) number of hair. The Fur procedural generates fur at render time, keeping the complexity at the end of the rendering process. The simulation and the export processes stay light.

The Library/Procedurals/HairAndFur procedural for all the procedural attributes details. If you are using Yeti®, or XGen®, you may not need to use the Fur procedural. Guerilla Render includes a XGen® plug-ins and Yeti® provides a RenderMan® DSO that is directly used in Guerilla Render. See the TD Guide/Third Party Tools/Yeti and TD Guide/Third Party Tools/XGen sections for details.

Generate the fur

The Fur node is a procedural geometry node. It acts like a regular mesh node (shaders, sets can be assigned to it using the RenderGraph) but it generates its geometry. It can be linked to other mesh nodes, like the scalp meshes and the guide curves.

Create a Fur procedural node
  1. Create a Procedurals/Fur node.

The scalp mesh

The scalp is the mesh on which the fur is generated.

Our scalp mesh in red, the fur generated on the scalp mesh.

Connect the scalp using the linker

Use this method to get an OpenGL feedback of the procedural.

  1. Select the Fur procedural node.
  2. Open the 'Procedural' tab.
  3. Press the 'Scalp -> Edit' button.
  4. In the linker window, select in the right column the scalp mesh.

Connect the scalp using Sets

Use this method to connect the procedural using the RenderGraph. This connection method won't work with OpenGL.

  1. Put the scalp objects in a specific set, like "Scalp" using the RenderGraph.
  2. Select the Fur procedural node.
  3. Add to the attribute Fur -> Procedural -> Scalp Set the new set.
The User Guide/Scene Graph/Set chapter to learn how to put some objects in the sets.

Control a fur attribute with a sub shader

Most fur attributes, like the density or the orientation, can be controlled by a scalp objects sub shader, like a simple texture, or any other sub shader expression. In the Library/Procedurals/HairAndFur procedural documentation, look for the attributes named Shader Out. Those attributes defines the name of the scalp object sub-shader to use to control the fur attribute.

Add a texture sub shader on the scalp objects to control a fur attribute (Density here)
  1. In the RenderGraph, add on the scalp objects a RenderGraph/MaterialOverride node.

  2. In the MaterialOverride node, add a float attribute named like the name defined in the Fur procedural, Density here.

  3. Drag and drop your mask texture on the edit box.

The density texture, and the fur using the density texture.

The User Guide/Shading/Sub-Shaders and Textures section for the details about the sub-shaders. Please note the sub shader has to be put on the scalp objects not the guide curves.

Orient the fur

The fur can be oriented or not. To orient the fur, you have to paint direction maps in a painting tool (like Mari®) or export some guides from any third party grooming solution (like Maya® Hair or Shave and Haircut®). Then export everything in Guerilla Render.

The fur procedural with random orientation, oriented using a texture sub shader and using guide curves.

Using a texture sub shader

The simplest solution to orient the fur is to use a texture sub shader. There is two types of textures. The polar maps, generated by Maya Fur, and the direction maps, generated by Mari®.

The polar map, the fur oriented by the polar map, the direction map and the fur oriented by the direction map.

Use a texture sub shader to orient the fur
  1. Set the Fur -> Procedural -> Orientation -> Polar -> Polar Shader Mode attribute to Polar or Direction.
  2. As explained before, add to the scalp objects color sub shader named Polar and drop your texture into it.
The Polar sub shader must be a Color attribute. The texture gamma should be set to Linear.

Using guide curves

Another solution to orient the fur is to use guide curves. The guide curves can be simulated in a third party tool. The fur procedural interpolates the guides to get the fur orientation and inclinaison.

The guides curves which guide the fur, the generated fur.

The guides can be any kind of curves. For example :

  1. A Maya® Hair node with guides inside
  2. A group node with Maya® curves inside
  3. A Shave And Haircut® node
  4. Alembic curves

Connect the guide curves using the linker

Use this method to get an OpenGL feedback of the procedural.

  1. Select the Fur procedural node.
  2. Open the 'Procedural' tab.
  3. Press the 'Guides -> Edit' button.
  4. In the linker window, select in the right column the guide curves object.

Connect the guide curves using Sets

Use this method to connect the procedural using the RenderGraph. This connection method won't work with OpenGL.

  1. Put the guide curves object objects in a specific set, like "Guides" using the RenderGraph.
  2. Select the Fur procedural node.
  3. Add to the attribute Fur -> Procedural -> Guides Set the new set.
The User Guide/Scene Graph/Set chapter to learn how to put some objects in the sets.

Bake the implantation

If you are doing an animation, you probably want the fur implantation to be consistent over time to avoid flicking. To do that, you have to bake the fiber implantation.

Bake the implantation
  1. Select the Fur procedural node.
  2. Turn the 'Implantation -> Implantation Mode' to 'Bake'
  3. Wait for an OpenGL update or render the procedural
  4. Turn the 'Implantation -> Implantation Mode' to 'Read'

Now the implantation is always the same. The Implantation parameters are no longer used.

Shading

The Fur procedural can generate fiber attributes to control the hair shader. You can activate those attributes in Fur -> Procedural -> Attributes.

The ST attribute

Add in the fiber the scalp ST parameters. You need to turn this on to map textures on the fur using the scalp texture coordinates.

Generate the st attribute

Assign a texture in the RenderGraph Curves material node

The hair diffuse color is textured using the scalp st texture coordinates

The N attribute

The Curves shader can compute the curves diffuse BSDF like a surface diffuse BSDF, using the surface normal. To do that, actvate the N attribute and set the Curves > Diffuse > Diffuse Mode attribute to surface.

The fur shaded in curve mode and in surface mode. The surface mode needs the N attribute to be generated.

The ID attribute

The curve id is always available in the shader, you don't need to compute it anymore.

The ClumpID attribute

Add a unique ID attribute per clump. The ID is the clumping guide number, starting at 0. The ClumpID is generated in the shader variable float13. It can be used in the shader to add some random colors per clump like the ID attribute.

Generate the clumpid attribute.

The clump id shading setup.

The diffuse color is different for every clumps.

The Library/Materials/Curves shader.